Personyze Support Personyze Support docs
Open Personyze
Recommendations

Open-Time Email Recommendations — Embed in Any ESP

Add live, personalized product recommendations to any email platform — Mailchimp, Klaviyo, HubSpot, ActiveCampaign, Brevo, Constant Contact. Each recipient sees products picked for them at the moment they open the…

Updated 24 minutes ago 14 min read
A
by Admin

Your email platform is great at sending. But what if the product recommendations inside each email updated themselves in real time — showing each recipient exactly what they’re most likely to buy, based on their most recent behavior, at the moment they open the email?

That’s what Personyze’s open-time email personalization does. It works by dropping a single HTML snippet into any campaign template — no matter which ESP you use. This guide walks you through the whole process for Mailchimp, Klaviyo, HubSpot, ActiveCampaign, Brevo, and Constant Contact.

How open-time personalization works

Traditional email product blocks bake content in at send time — every recipient gets the same thing. Personyze’s approach is different: you embed an HTML snippet once inside your campaign template. Every time a customer opens that email, the snippet calls Personyze live, identifies the recipient, and renders a personalized recommendation image right then.

From purchase to personalized email — the flow

  1. Personyze tracks the purchase live — your site fires a purchase event with order details to Personyze.
  2. Your ESP sends the order confirmation with the Personyze snippet embedded as image tags.
  3. Customer opens the email — their email client requests the image URLs from Personyze.
  4. Personyze renders personalized images on the fly — pulled from each recipient’s behavioral profile and your live product catalog.

Works with any ESP.The snippet is plain HTML <img> tags pointing to Personyze URLs. Any email platform that lets you drop in custom HTML works — Mailchimp, Klaviyo, HubSpot, ActiveCampaign, Brevo, Constant Contact, Campaign Monitor, Salesforce Marketing Cloud, and more.

Prerequisites

  • An active Personyze account with email recommendations enabled on your plan
  • Access to your email platform with permission to edit campaign HTML
  • A product catalog ready to upload — or one already synced in Personyze
  • Personyze’s tracking script installed on your website for behavioral data

Already using Personyze on-site?If you have on-site recommendations running, your catalog is loaded and interaction tracking is active. Skip Steps 1 and 2 and go straight to building your email widget.

Step 1 — Upload your product catalog

Personyze uses a single unified product database. If you’ve already uploaded products for on-site recommendations, skip this step entirely. Otherwise, go to Settings → Product Catalog and choose one of three sync methods:

CSV uploadExport your product feed from Shopify, WooCommerce, or Magento and upload directly. Required: product_id, name, price, image_url, product_url. Recommended: category, brand, availability.
XML / JSON feed (auto-sync)Provide a feed URL — Google Shopping XML format works natively. Personyze auto-syncs hourly, daily, or weekly. Essential for keeping availability and pricing current at email open time.
API integrationPush products programmatically from your backend via the Personyze Catalog API. Best for large catalogs or real-time inventory accuracy.

Keep your catalog fresh.Recommendations render at open time. A product showing as available that’s actually out of stock is a frustrating experience — set up scheduled feed syncing wherever possible.

Step 2 — Set up product interaction tracking

Personyze captures behavioral data through product interaction events — views, add-to-carts, and purchases — fired from your website. If Personyze is already running on-site, this is already done.

Install the Personyze tag

Add the Personyze tracking script to your site’s <head>. You’ll find your unique snippet in Settings → Tracking Code. It looks like this:

<script>
window._S_T || function(s) {
  s.async = true;
  s.src = '//counter.personyze.com/stat-track-lib.js';
  s.onload = function() {
    _S_T.async = true;
    _S_T.setup(YOUR_ACCOUNT_ID, "your-domain.com");
  };
  (document.querySelector('head') || document.documentElement).appendChild(s);
}(document.createElement('script'))
</script>

Fire product view events

On each product detail page, fire a product_view event so Personyze can build behavioral profiles. This is what powers the Personalized Recommendations algorithm in email:

window.personyze = window.personyze || [];
window.personyze.push(['trackEvent', 'product_view', {
  product_id:   'SKU-1234',
  product_name: 'Blue Running Shoe',
  category:     'Footwear > Running',
  price:        89.99,
  currency:     'USD'
}]);

Track add-to-cart and purchases

For the strongest recommendations, also fire add_to_cart and purchase events on the relevant pages:

// On add-to-cart
window.personyze.push(['trackEvent', 'add_to_cart', {
  product_id: 'SKU-1234', price: 89.99, currency: 'USD'
}]);

// On purchase confirmation
window.personyze.push(['trackEvent', 'purchase', {
  order_id: 'ORD-9876',
  products: [
    { product_id: 'SKU-1234', price: 89.99, quantity: 1 }
  ],
  total: 89.99, currency: 'USD'
}]);

Linking tracked events to email recipients.For Personyze to connect on-site behavior to an email recipient, it needs to know their identity. Pass the user’s email or CRM ID to Personyze after login or from a known session. See the product interaction tracking guide for full details on identifying users.

Step 3 — Build your widget in Personyze

Navigate to Email Recommendations → Get Code Wizard. The wizard takes you through three sub-steps: algorithm, template, and customization.

Algorithm options

🎯 Personalized recommendationsBased on each recipient’s individual browsing and purchase history. Strongest for warm audiences who’ve visited your site before.
🔥 Best seller / most popularCurrently popular products based on aggregate behavior. Ideal for new subscribers or cold audiences. Great fallback for any campaign.
🛒 Based on last purchaseRecommends products related or complementary to what the recipient last bought. Perfect for post-purchase follow-up sequences.
👁 Based on recently viewedSurfaces products the recipient was browsing most recently. Great for re-engagement or abandoned browse campaigns.
🏷 Promotional bannerA fully designed promotional banner targeted by segment, time of day, or personalized with recipient name or location — instead of product cards.

Template & customization

After choosing an algorithm, select a template layout from the library, then use the left panel to customize colors, badges, button text, image sizing, and spacing. The live preview updates in real time.

Available templates include Row Card, Gradient Overlay, Minimal Elegant, Dark Showcase, and Horizontal Rows:

Row Card template Gradient Overlay template Minimal Elegant template Dark Showcase template Horizontal Rows template

Set the number of products to display — typically 3–4 for transactional emails, up to 6 for dedicated recommendation campaigns.

Step 4 — Understanding the embed code

How it actually works — unique URLs per recipient

The snippet Personyze generates is not a generic image. Each <img src> is a unique URL that encodes the recipient’s identity. When a subscriber opens the email, their email client requests that URL from Personyze. Personyze then:

  1. Looks up the subscriber’s behavioral profile (browsing history, purchases, categories viewed)
  2. Runs your chosen recommendation algorithm against that profile
  3. Checks your live product catalog for current pricing and availability
  4. Renders and returns a personalized product image — live, at that moment

Each product slot in the widget has its own URL (ending in /k=...v, /k=...w, etc.) so Personyze can independently optimize what goes in each slot.

The generated snippet

<table>
  <tr>
    <td>
      <a href="https://pic.personyze.com/href/k=8qy0zs2vbzcv/email={INSERT EMAIL HERE}">
        <img src="https://pic.personyze.com/png/k=8qy0zs2vbzcv/email={INSERT EMAIL HERE}" alt="Recommended"/>
      </a>
    </td>
    <td>
      <a href="https://pic.personyze.com/href/k=8qy0zs2vbzcw/email={INSERT EMAIL HERE}">
        <img src="https://pic.personyze.com/png/k=8qy0zs2vbzcw/email={INSERT EMAIL HERE}" alt="Recommended"/>
      </a>
    </td>
  </tr>
</table>

The fallback — why you always get something useful

When you send a campaign, Personyze has never seen your recipient list before — it doesn’t know who’s in your Mailchimp or Klaviyo audience until the email is opened. So Personyze is designed with a smart fallback:

  • If a recipient’s email is known to Personyze (they’ve visited your site with tracking active and their identity was captured) — they get fully personalized recommendations.
  • If a recipient’s email is not yet in Personyze (new subscriber, or tracking not yet linked) — the widget falls back to your configured fallback algorithm, typically Most Popular or Best Sellers, so the email still shows relevant suggestions rather than a broken image.

Configure your fallback in the Recommendation step under Fallback recommendation if no results.

Non-personal recommendations (no tracking required)

Don’t have behavioral tracking set up yet? You can still use Personyze for email recommendations using context-based approaches:

  • Pass a product ID in the URL — for example, in a post-purchase email for order #XYZ, pass the product ID and Personyze will surface items bought together or viewed together with that product, based on aggregate behavior.
  • Site-wide best sellers — with no individual or product context, Personyze surfaces your current top-performing products based on all visitor activity. A strong baseline that still beats static editorial picks.

Replace every instance of the placeholder.Each product slot has two occurrences of {INSERT EMAIL HERE} — one in the href (click tracking) and one in the src (image render). Replace all occurrences, not just the first one.

Step 5 — Insert into your email platform

The process is the same for every ESP: add the Personyze HTML snippet to your campaign, then swap the placeholder with that platform’s merge tag for the subscriber’s email address. The exact merge tag differs per platform — sections below cover the major ones.

🐒 Mailchimp
  1. Open your campaign template. Go to Campaigns → Email Templates (or open a draft and click Edit Design) to launch the drag-and-drop editor.
  2. Add a Code content block. Drag a Code block from the sidebar into your template — typically below the main hero, above the footer.
  3. Paste the snippet and replace the placeholder. Click into the Code block, paste the full HTML, then replace {INSERT EMAIL HERE} with Mailchimp’s merge tag: *|EMAIL|*
  4. Send a test email to verify. Use Preview & Test → Send a Test Email — the visual preview won’t substitute merge tags. Open the test in your inbox to confirm the image loads with real recommendations.

Visual preview limitation.Mailchimp’s drag-and-drop preview does not substitute merge tags — it shows the literal text *|EMAIL|* in the URL. Always send a real test email to verify.
🎯 Klaviyo
  1. Open the email template editor. Navigate to Content → Templates or open your Flow/Campaign email and click Edit.
  2. Add a Text or HTML block. Drag in a Text block and switch to HTML mode, or use an HTML block if your template supports it. Paste the Personyze snippet.
  3. Replace the placeholder. Klaviyo uses double-curly-brace Django-style templating. Replace {INSERT EMAIL HERE} with: {{ email }}
  4. Preview with a real profile. Use Klaviyo’s Preview as Person feature, select a real subscriber, and verify the image loads with personalized recommendations.

Klaviyo flow tip.Klaviyo flows are especially powerful combined with the Recently Viewed or Abandoned Browse algorithms — Klaviyo’s behavioral triggers paired with Personyze’s open-time rendering creates highly relevant, timely emails.
🟠 HubSpot
  1. Open the email editor. Go to Marketing → Email and open or create a campaign. Click Edit to launch the drag-and-drop editor.
  2. Add a Rich Text or Custom HTML module. Drag a Rich Text module into your template. Click the </> Source Code icon in the toolbar to switch to HTML mode. Paste the Personyze snippet.
  3. Replace the placeholder. HubSpot uses HubL (HubSpot’s templating language). Replace {INSERT EMAIL HERE} with: {{ contact.email }}
  4. Send a test & preview. Use HubSpot’s Send Test Email with a real contact record to confirm the merge tag resolves and recommendations load.

HubSpot workflows.This pairs especially well with HubSpot’s contact lifecycle workflows. Trigger a Personyze-powered email at key moments — post-demo, post-purchase, or re-engagement — where personalized product recommendations add genuine value.
⚡ ActiveCampaign
  1. Open the email designer. Navigate to Campaigns → Create a Campaign or open an existing automation email. Use the New Email Designer.
  2. Add an HTML block. Drag an HTML content block into your template. Click to edit and paste the Personyze snippet.
  3. Replace the placeholder. ActiveCampaign uses percent-wrapped tags. Replace {INSERT EMAIL HERE} with: %EMAIL%
  4. Test via automation. Add a test contact to the automation or use Send Preview Email with a real contact to verify the tag resolves and recommendations appear.
💙 Brevo (formerly Sendinblue)
  1. Open the template editor. Go to Email → Templates and open or create a template.
  2. Switch to the HTML editor. Click the </> HTML button in the top right to access the raw HTML. Paste the Personyze snippet where you want the recommendations to appear.
  3. Replace the placeholder. Brevo uses double-curly-brace syntax. Replace {INSERT EMAIL HERE} with: {{ contact.EMAIL }} (uppercase).
  4. Send test. Use Preview & Test → Send Test Email with a real contact to confirm personalization renders correctly.
📮 Constant Contact
  1. Open the email template. Go to Campaigns → Create an Email, choose your template, and open the editor.
  2. Add a Custom Code block. Click Insert → More → Custom Code to add a raw HTML block. Paste the Personyze snippet.
  3. Replace the placeholder. Constant Contact uses an older-style tag format. Replace {INSERT EMAIL HERE} with: $[LN:EMAIL:$]
  4. Preview & test. Use Preview → Preview As Subscriber and select a real subscriber to verify the personalization tag resolves correctly before sending.

Quick reference — email merge tags

Summary of the exact merge tag to use for each platform when replacing {INSERT EMAIL HERE}:

Email platform Replace {INSERT EMAIL HERE} with Notes
Mailchimp *|EMAIL|* Standard Mailchimp merge tag
Klaviyo {{ email }} Django-style template variable
HubSpot {{ contact.email }} HubL contact property
ActiveCampaign %EMAIL% Percent-wrapped personalization tag
Brevo {{ contact.EMAIL }} Uppercase field name
Constant Contact $[LN:EMAIL:$] Substitution tag
Campaign Monitor [email] Bracketed merge tag
Salesforce Marketing Cloud %%emailaddr%% AMPscript substitution string
Any other ESP Your platform’s email merge tag Check your platform’s docs

Prefer CRM ID over email address?If your Personyze profiles are keyed by internal user ID rather than email, use the {INSERT USER ID HERE} placeholder variant in the snippet and replace it with your platform’s merge tag for that field. This also avoids passing email addresses in URL parameters.

Step 6 — QA & preview your recommendations

Before sending to your full list, use Personyze’s built-in QA tool (the QA step in the wizard) to verify recommendations are working and personalized correctly.

Look up any subscriber by email

In the QA step, type any subscriber’s email address into the Find user field. Personyze will instantly render the exact product images that user would see when they open their email — based on their current behavioral profile in real time.

Below the rendered recommendations, expand the user row to see their full product interaction history: every product they’ve viewed, added to cart, or purchased, with timestamps and session data. Useful for confirming that tracking is working correctly and that the algorithm is picking up on the right signals.

What if the user isn’t in Personyze yet?If the email you enter has no history in Personyze, the QA tool shows your configured fallback recommendations (Most Popular / Best Sellers). This is exactly what that subscriber would receive in the real email — so it confirms the fallback is working correctly too.

What to verify before sending

  • Recommendations look personalized. The products in the QA preview should relate to that user’s known interests — not random. If they look generic, check that behavioral tracking events are firing and that the user’s email is being passed correctly from your site.
  • Fallback renders cleanly. Test with a brand-new email address that has no history. You should see Best Sellers or Most Popular — not a blank or broken widget.
  • Send a real test from your ESP. Always send a test email from your actual ESP (not just the visual preview, which won’t resolve merge tags). Open it in your real inbox.
  • Click-through destination is correct. Click each product image in your test email. Verify it goes to the correct product page and that Personyze’s click tracking fires for accurate attribution.

Never rely on the visual preview alone.All major ESPs’ drag-and-drop visual previews do not substitute merge tags — they show raw placeholder text in the URL, causing the image request to fail. Always use a real test send.

Step 7 — Performance reporting

After your campaign goes live, Personyze’s Performance tab gives detailed attribution metrics that go beyond what your ESP’s native analytics provide for the recommendation block.

Campaign-level metrics

📊 ViewedTotal times the recommendation widget was rendered — i.e., the email was opened with image loading enabled. Your impression count for the personalization layer.
🖱 ClickedPercentage of viewers who clicked at least one product, plus total product clicks and average clicks per user. Tells you how engaging the recommendation selection is.
🛒 Added to cartUsers who clicked through and subsequently added a recommended product to cart, tracked via your site’s Personyze event tracking.
💰 Purchased & revenueTotal transactions, revenue, and contribution ratio attributed to the email recommendation widget. Direct ROI for the personalization layer.

Drill down by user

Switch to the Users tab within Performance to see a breakdown by individual subscriber — which specific email addresses clicked, added to cart, or purchased, and exactly which products they interacted with. Useful for:

  • Validating that high-intent users are getting the most relevant recommendations
  • Identifying which user segments drive the most purchase conversions from email
  • Feeding insights back into your algorithm or segment choices for future campaigns

Reporting time ranges.Use the time range selector (From start, From last edit, Last 7 days, custom date range) to isolate performance from a specific campaign send or test period. Performance data updates approximately 1 hour after visitor sessions end.

Tips for best results

  • Keep your catalog fresh. Schedule daily or hourly feed syncs. Stale prices and out-of-stock products erode trust instantly.
  • Mid-email placement outperforms top or bottom. Below the hero banner, above the footer consistently drives higher click-through than other positions.
  • 3–4 products for transactional emails, 4–6 for dedicated recommendation sends. More products means more scrolling — test to find your sweet spot.
  • Set a meaningful fallback. For new subscribers with no behavioral history, fall back to Best Sellers or Most Reviewed — not random products.
  • Match your subject line to the personalization. If your subject says “Picked just for you,” the recommendations need to actually feel personal. Ensure behavioral data is populating before deploying at scale.
  • Don’t skip alt text. A descriptive alt attribute on the recommendation image ensures corporate Outlook users who block images by default still see a clear CTA.